package authstates 
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.BlendMode;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.TimerEvent;
	import flash.filters.BlurFilter;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	import flash.utils.Timer;
	/**
	 * ...
	 * @author Anders Figenschow selvfølgelig
	 */
	public class Deco extends Sprite
	{
		private var screenData:BitmapData;
		private var mc:Sprite;
		private var objectData:BitmapData;
		private var blur:BlurFilter;
		
		public function Deco() 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			
			mc = new Sprite();
			addChild(mc);
			
			mc.x = stage.stageWidth / 2;
			mc.y = stage.stageHeight / 2;
			mc.graphics.lineStyle(1, 0xffffff);
			
			var amount:int = 36;
			
			for (var i:int = 0; i < amount; i++) 
			{
				var degrees:Number = 360 / amount;
				var color:uint;
				if (i % 2 == 0) {
					color = 0xfff000;
				} else {
					color = 0xff0000;
				}
				var triangle:Triangle = new Triangle(color);
				mc.addChild(triangle);
				triangle.rotationZ = degrees * i;
			}
			mc.blendMode = BlendMode.SCREEN;
			mc.alpha = 0.3;
			addEventListener(Event.ENTER_FRAME, enterframe);
		}
		
		private function enterframe(e:Event):void 
		{
			
		}
		
	}

}